import request from '@/utils/request'
// 获取分类列表
export const categoriesList = (params) => {
  return request.get('/categories', { params })
}

// 获取分类列表数量
export const categoriesNumber = (params) => {
  return request.get('/categories/count', { params })
}

// 根据id获取分类
// export const GetCategoriesById = (id) => {
//   return request.get('/categories' + id)
// }
export function GetCategoriesById(id) {
  return request({
    url: '/categories/' + id,
    method: 'get'
  })
}

// 删除分类
export function DeleteCategoires(id) {
  return request({
    url: '/categories/' + id,
    method: 'delete'
  })
}

// 模糊搜索
export const SerchCategories = (params) => {
  return request.get('/categories', { params })
}

// 新建经纪
export function AddCategories(data) {
  return request({
    url: '/categories',
    method: 'post',
    data
  })
}
// 编辑经纪
export const EditCategories = (data) => {
  return request.put(`/categories/${data.id}`, data)
}

// 根据id获取指定分类
// export
